/**
 * 
 */
package org.softTank.BC.data;

import java.util.ArrayList;
import java.util.List;

import org.softTank.BC.entity.services.PartnerLinkType;
import org.softTank.BC.entity.services.Role;
import org.springside.modules.test.DataUtils;

/**
 * @author Yuzone
 *
 */
public class PartnerLinkTypeData {

	public static PartnerLinkType getRandomPLTWithoutFK() {
		PartnerLinkType ptl = new PartnerLinkType();
		ptl.setName(DataUtils.randomName("ptl"));
		ptl.setDescription("desc");
		ptl.setLocation("location");
		ptl.setNamespace("namespace");

		return ptl;
	}

	public static PartnerLinkType getRandomPLTWithFK() {
		PartnerLinkType plt = getRandomPLTWithoutFK();
		plt.setId(1L);
		plt.setCategory(CategoryData.getTestCategory());
		List<Role> l = new ArrayList<Role>();
		l.add(RoleData.getTestRole());
		plt.setRoleList(l);

		return plt;
	}

	public static PartnerLinkType getTestPLT() {
		PartnerLinkType plt = getRandomPLTWithoutFK();
		plt.setName("name");
		plt.setId(1L);

		return plt;
	}

	public static PartnerLinkType getPLTWithInferiors() {
		PartnerLinkType plt = getRandomPLTWithoutFK();
		plt.setId(1L);
		List<Role> l = new ArrayList<Role>();
		l.add(RoleData.getRoleWithInferiors());
		plt.setRoleList(l);

		return plt;
	}
}
